import request from '@/utils/request'

export function Get(id, args) {
  return request({
    url: `/orders/api/blackaddress_index/${id || ''}${args && ('?' + args) || ''}`,
    method: 'get'
  })
}

export function Post(data) {
  return request({
    url: '/orders/api/blackaddress_index/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}

export function Put(id, data) {
  return request({
    url: `/orders/api/blackaddress_index/${id || ''}`,
    headers: { 'content-type': 'application/json' },
    method: 'put',
    data: JSON.stringify(data)
  })
}

export function Delete(id) {
  return request({
    url: `/orders/api/blackaddress_index/${id || ''}`,
    method: 'delete'
  })
}

export function AddOrderAddressBlack(data) {
  return request({
    url: '/orders/api/blackaddress_addorder/',
    headers: { 'content-type': 'application/json' },
    method: 'post',
    data: data
  })
}
